package com.zhiyou100.crm.service.impl;

import com.zhiyou100.crm.dao.UserDao;
import com.zhiyou100.crm.dao.impl.UserDaoImpl;
import com.zhiyou100.crm.service.UserService;
import com.zhiyou100.crm.util.User;

import java.util.List;

public class UserServiceImpl implements UserService {
    UserDao userDao =new UserDaoImpl();
    @Override
    public List<User> queryUserByNmae(String u_name) {
        return userDao.queryUserByName(u_name);
    }


    @Override
    public List<User> queryAllUser() {
        return userDao.queryAllUser();
    }

    @Override
    public boolean updateUser(int u_id, User user) {
        return userDao.updateUser(u_id,user);
    }

    @Override
    public int addUser(User user) {
        return userDao.addUser(user);
    }

    @Override
    public boolean deleteUser(int u_id) {
        return userDao.deleteUser(u_id);
    }
}
